{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4a602998",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'function'>\n",
      "<function fun1 at 0x7ffaecc6d670>\n",
      "140715691005552\n"
     ]
    }
   ],
   "source": [
    "def fun1():\n",
    "    print('hello world!')\n",
    "    \n",
    "print(type(fun1))\n",
    "print(fun1)\n",
    "print(id(fun1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "109c9671",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "fun2() missing 1 required positional argument: 'x'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m/var/folders/wk/41sn44kx3_dc1n5395nfzdrr0000gn/T/ipykernel_62240/1813585483.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      5\u001b[0m     \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      6\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0mf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfun2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mc\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m: fun2() missing 1 required positional argument: 'x'"
     ]
    }
   ],
   "source": [
    "def fun2(x,a=1,b=2,c=3):\n",
    "    print(x)\n",
    "    print(a)\n",
    "    print(b)\n",
    "    print(c)\n",
    "    \n",
    "f = fun2(c=5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "76ef0598",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
